import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/index/components/index'
import Match from '@/index/components/match/Match'
import MatchDetails from '@/index/components/match/MatchDetails'
import League from '@/index/components/league/League'
import LeagueDetails from '@/index/components/league/LeagueDetails'
import Player from '@/index/components/player/Main'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index,
      children: [
          {
            path: '/',
            redirect: 'match'
          },
          {
              path: 'match',
              component: Match
          },
          {
              path: 'match/details/:matchId',
              component: MatchDetails
          },
          {
              path: 'league',
              component: League
          }, 
          {
              path: 'league/details/:matchId',
              component: LeagueDetails
          },
          {
              path: 'player',
              component: Player
          },
      ]
    }
  ]
})
